<?php
$lang_slo = trans('view.game.data.settlement.slo');
$lang_boolean = trans('view.form.booleanList');

$result = $detail['details']['result'] ?? [];
?>

@extends('games.base')

@section('content')
    @isset($result)
        @include('games.slo')

        <div class="row">
            <div class="col">
                <div class="el-form-item">
                    <label class="el-form-item__label">{{ $lang_slo['win_gold'] }}</label>
                    @if($result['is_bonus'] == 1)
                        <div class="el-form-item__content">{{ num_format($result['win_gold'] - $result['spin_data']['detail']['bonus']['award']) }}</div>
                    @else
                        <div class="el-form-item__content">{{ num_format($result['win_gold']) }}</div>
                    @endif
                </div>
            </div>
            <div class="col">
                <div class="el-form-item">
                    <label class="el-form-item__label">{{ $lang_slo['is_bonus'] }}</label>
                    <div class="el-form-item__content">{{ $lang_boolean[$result['is_bonus']] }}</div>
                </div>
            </div>
            @if($result['is_bonus'] == 1)
                <div class="col">
                    <div class="el-form-item">
                        <label class="el-form-item__label">{{ $lang_slo['bonus_box_open'] }}</label>
                        <div class="el-form-item__content">
                            @foreach ($result['bonus_box_open'] as $box) {{ $box['bet'] }} @endforeach
                        </div>
                    </div>
                </div>
                <div class="col">
                    <div class="el-form-item">
                        <label class="el-form-item__label">{{ $lang_slo['bonus_bonus'] }}</label>
                        <div class="el-form-item__content">{{ num_format($result['spin_data']['detail']['bonus']['award']) }}</div>
                    </div>
                </div>
                <div class="el-form-item">
                    <label class="el-form-item__label">{{ $lang_slo['bonus_box_all'] }}</label>
                    <div class="el-form-item__content">
                        @foreach ($result['bonus_box_all'] as $box) {{ $box['bet'] }} @endforeach
                    </div>
                </div>
            @endif
        </div>
    @endisset
@endsection
